import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    httpTabs: JSON.parse(localStorage.getItem("httpTabs")) || []
  },
  mutations: {
    saveHttpTabs(state,value){
      try {
        localStorage.setItem("httpTabs",JSON.stringify(value));
      }catch (e) {
        console.log("禁止使用本地缓存")
      }
      state.httpTabs = value;
    }
  },
  actions: {
  },
  modules: {
  }
})
